package com.lxd.milktea.enums;

import lombok.Getter;

@Getter
public enum  ResultEnum implements CodeEnum{
    SUCCESS((byte)0, "成功"),
    PARAM_ERROR((byte)1, "参数不正确"),
    USER_NO_LOGIN((byte)26,"用户未登陆"),
    /**
     * 商品不存在
     */
    PRODUCT_NOT_EXIST((byte)10,"商品不存在"),
    /**
     * 商品库存不正确
     */
    CART_EMPTY((byte)18,"购物车不能为空"),

    ORDER_OWNER_ERROR((byte)19,"订单不属于当前用户"),
    PRODUCT_STOCK_ERROR((byte)11,"商品库存不正确"),
    ORDER_NOT_EXIST((byte)12,"订单不存在"),
    ORDERDETAIL_NOT_EXIST((byte)13,"订单详情不存在"),
    ORDER_UPDATE_FAIL((byte)15,"订单更新失败"),
    ORDER_STATUS_ERROR((byte)14,"订单状态不正确"),
    ORDER_DETAIL_EMPTY((byte)16,"订单详情为空"),
    ORDER_PAY_STATUS_ERROR((byte)17,"订单支付状态不正确"),
    ORDER_CANCEL_SUCCESS((byte)21,"订单取消成功"),
    ORDER_FINISH_SUCCESS((byte)22,"订单完结成功"),
    LOGIN_FAIL((byte)25,"登录失败，信息错误"),
    ;
    private Byte code;
    private String msg;
    ResultEnum(Byte code,String msg) {
        this.code =code;
        this.msg = msg;
    }


}
